/*
 * @Descripttion: 员工信息API
 * @version:
 * @Author: 许国辉
 * @Date: 2022-08-02 20:44:21
 * @LastEditors: 许国辉
 * @LastEditTime: 2023-10-16 11:54:27
 */
import { defHttp } from '/@/utils/http/axios';
import { EmployeeInfoModel, EmployeeParams } from './model/EmployeeInfoModel';
// import { DemoParams } from '../demo/model/tableModel';

enum Api {
  getEmployeeList = '/employee/getEmployeeEntityVOs',
  saveEmployeeEntityVO = '/employee/saveEmployeeEntityVO',
  delEmployeeEntityVO = '/employee/delEmployeeEntityVO',
  syncEmployeeEntityVO = '/employee/syncEmployeeEntityVO',
  autoSyncEmployeeEntityVO = '/employee/autoSyncEmployeeEntityVO',
}

/**
 * @description: getUserInfo
 */

export function getEmployeeListResultModel(params: EmployeeParams) {
  return defHttp.post<EmployeeInfoModel>({
    url: Api.getEmployeeList,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
}
export function saveEmployeeEntityVO(params: EmployeeInfoModel) {
  return defHttp.post({
    url: Api.saveEmployeeEntityVO,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
}
export function delEmployeeEntityVO(params) {
  return defHttp.post({
    url: Api.delEmployeeEntityVO,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
}
export function syncEmployeeEntityVO(params: EmployeeInfoModel) {
  return defHttp.post({
    url: Api.syncEmployeeEntityVO,
    params,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
}

// 自动同步员工信息
export function autoSyncEmployeeEntityVO() {
  return defHttp.post({
    url: Api.autoSyncEmployeeEntityVO,
    headers: {
      // @ts-ignore
      ignoreCancelToken: true,
    },
  });
}
